package com.ruoyi.mapper;

import com.ruoyi.entity.JrVersion;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VersionMapper {
    int insertVersion(JrVersion version);

    // 获取文件版本信息
    List<JrVersion> selectVersionsByFileId(@Param("fileId") Long fileId);

    @Delete("DELETE FROM jr_version WHERE file_id = #{fileId}")
    void deleteVersionsByFileId(Long fileId);
}
